package cn.ljy.quicksnip.model;

import cn.ljy.authority.model.SysCustomer;
import cn.ljy.authority.model.SysHairdresser;
import cn.ljy.authority.model.SysShop;
import cn.ljy.common.model.BaseModel;
import cn.ljy.common.model.validate.AddWorkValidation;
import cn.ljy.common.model.validate.UpdateWorkValidation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

@ApiModel(value = "预约订单")
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false, of = {"id"})
public class QsAppointment extends BaseModel {

    @ApiModelProperty(value = "预约ID", example = "1")
    @NotNull(groups = UpdateWorkValidation.class, message = "预约ID不能为空")
    private Long id;

    @ApiModelProperty(value = "理发项目", example = "1")
    @NotNull(groups = AddWorkValidation.class, message = "理发项目ID不能为空")
    private QsProject project;
    private Long projectID;

    @ApiModelProperty(value = "客户", example = "1")
    @NotNull(groups = AddWorkValidation.class, message = "客户ID不能为空")
    private SysCustomer customer;
    private Long customerID;

    @ApiModelProperty(value = "理发师", example = "1")
    @NotNull(groups = AddWorkValidation.class, message = "理发师ID不能为空")
    private SysHairdresser hairdresser;
    private Long hairdresserID;

    @ApiModelProperty(value = "店铺", example = "1")
    @NotNull(groups = AddWorkValidation.class, message = "店铺ID不能为空")
    private SysShop shop;
    private Long shopID;

    @ApiModelProperty(value = "预约类型：1线下 2线上", example = "1")
    @NotNull(groups = AddWorkValidation.class, message = "预约类型不能为空")
    private Integer appointType;

    @ApiModelProperty(value = "预约理发日期", example = "2024-01-01")
    @NotNull(groups = AddWorkValidation.class, message = "预约理发日期不能为空")
    private java.sql.Date appointDate;

    @ApiModelProperty(value = "预约理发开始时间", example = "2024-01-01 08:00:00")
    private Date serviceStartTime;

    @ApiModelProperty(value = "预约理发结束时间", example = "2024-01-01 08:30:00")
    private java.util.Date serviceEndTime;

    @ApiModelProperty(value = "预约状态：0已申请 1预约成功 2预约失败", example = "0")
    @NotNull(groups = AddWorkValidation.class, message = "预约状态不能为空")
    private Integer appointStatus;

    @ApiModelProperty(value = "付款金额", example = "50.00")
    @NotNull(groups = AddWorkValidation.class, message = "付款金额不能为空")
    private java.math.BigDecimal payAmount;

    @ApiModelProperty(value = "付款时间")
    private java.util.Date payTime;

    @ApiModelProperty(value = "付款状态：0未付款 1已付款 2已退款", example = "0")
    @NotNull(groups = AddWorkValidation.class, message = "付款状态不能为空")
    private Integer payStatus;

    @ApiModelProperty(value = "预约提交时间", example = "2024-01-01 08:00:00")
    @NotNull(groups = AddWorkValidation.class, message = "预约提交时间不能为空")
    private java.util.Date appointTime;

    @ApiModelProperty(value = "退款时间")
    private java.util.Date refundTime;

    @ApiModelProperty(value = "原价", example = "50.00")
    @NotNull(groups = AddWorkValidation.class, message = "原价不能为空")
    private java.math.BigDecimal originalPrice;

    @ApiModelProperty(value = "成交价格", example = "50.00")
    @NotNull(groups = AddWorkValidation.class, message = "成交价格不能为空")
    private java.math.BigDecimal finalPrice;

    @ApiModelProperty(value = "订单备注", example = "无")
    @Size(max = 255, message = "订单备注长度不能超过 {max} 个字符")
    private String remark;

    public QsAppointment(Long id) {
        this.id = id;
    }
}

